package com.ddtech.business.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ddtech.business.course.entity.CourseStudyRecord;
import com.ddtech.business.course.query.CourseStudyRecordQuery;
import com.ddtech.business.course.vo.res.CourseStudyVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程学习记录表 Mapper 接口
 * </p>
 *
 * @author bin_pu
 * @since 2023-02-06
 */
@Mapper
public interface CourseStudyRecordMapper extends BaseMapper<CourseStudyRecord> {
    /**
     * 获取进度列表
     *
     * @param page
     * @param courseStudyRecordQuery
     * @return
     */
    IPage<Map<String, Object>> getScheduleList(IPage page, @Param("courseStudyRecordQuery") CourseStudyRecordQuery courseStudyRecordQuery);

    CourseStudyRecord getBytaskIdAndCourseIdAndUserId(String taskId,String courseId,String userId);

    List<CourseStudyVo> getBytaskIdAndUserId(String taskId, String userId);
}
